let nodemailer = require('nodemailer');

function sendMail(email, subject, text) {
    const transporter = nodemailer.createTransport({
        "host": "smtp.qq.com",
        "port": 465,
        "secure": true,
        auth: {
            user: '2966242058@qq.com',
            pass: 'tusffemqhzbmdeaa'
        }
    });
    return transporter.sendMail({
        from: "'Tans' <2966242058@qq.com>", //管理员邮箱地址
        to: email, //接收者邮箱
        subject: subject, //邮箱主题
        text: text, //邮箱内容
    })
}

module.exports = sendMail;